Monad Combinators, Non-Determinism and Probabilistic Choice
نویسندگان
چکیده
We test Lüth and Ghani’s proposal [11, 12, 13] to use coproducts of monads as a basis for modularity by applying their ideas to Varacca’s work [20] on combining non-determinism and probabilistic choice. In particular, we discuss i) the coproduct of non-determinism and probabilistic choice; ii) how monad compositions based upon distributivity possess a universal property; and iii) Capretta’s [4] treatment of looping as an effect. We take advantage of the fact that all three effects are usefully modelled by ideal monads.
منابع مشابه
Layer by layer - Combining Monads
We develop a method to incrementally construct programming languages. Our approach is categorical: each layer of the language is described as a monad. Our method either (i) concretely builds a distributive law between two monads, i.e. layers of the language, which then provides a monad structure to the composition of layers, or (ii) identifies precisely the algebraic obstacles to the existence ...
متن کاملPower Domains Supporting Recursion and Failure
Following the program of Moggi, the semantics of a simple non-deterministic functional language with recursion and failure is described by a monad. We show that this monad cannot be any of the known power domain constructions, because they do not handle non-termination properly. Instead, a novel construction is proposed and investigated. It embodies both non-determinism (choice and failure) and...
متن کاملA Monadic Account of First-class Synchronous Events
These two quotations represent the key ideas behind two major research agendas. The first captures the essence of monadic I/O, which is the fundamental abstraction used to provide input/output and concurrency in the lazy, purely-functional language (Concurrent) Haskell. The second captures the essence of first-class synchronous events, which is the fundamental abstraction used to provide concur...
متن کاملGeneric Trace Theory
Trace semantics has been defined for various non-deterministic systems with different input/output types, or with different types of “non-determinism” such as classical non-determinism (with a set of possible choices) vs. probabilistic nondeterminism. In this paper we claim that these various forms of “trace semantics” are instances of a single categorical construction, namely coinduction in a ...
متن کاملSb: Capstone Abstract
Expressiveness Following the approach outlined by Meijer et. al. in [3], our language has basic built-in combinators (e.g. fold) that are sufficient for expressing a number of common programming tasks. For programs that lie outside the scope of these combinators we provide a cost monad that allows programmers to express runtime information about arbitrary Idris programs, and then lift those run...
متن کامل